/** ###################################################################
**     Filename  : Hmi.H
**     Project   : CyberPark
**     Processor : MC9S12XS128MAL
**     Compiler  : CodeWarrior HCS12X C Compiler
**     Date/Time : 2011-7-31, 23:02
**     Contents  :
**         User source code
**
**     (c) Copyright UNIS, a.s. 1997-2008
**     UNIS, a.s.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

#ifndef __Hmi_H
#define __Hmi_H

/* MODULE Hmi */
#include "Types.h"
#include "HMI_PA.h"
#include "HMI_ED.h"
#include "HMI_HIGH_BYTE.h"
#include "HMI_LOW_BYTE.h"
#include "HMI_SPIN.h"
#include "HMI_SPIN_DIR.h"
#include "HMI_IRQ.h"

typedef void HMI_PUSH_HANDLER(void);
      
extern HMI_PUSH_HANDLER *volatile HmipPushHandler;
extern U8 HmiCurrentNumber;
extern U8 HmiIsOn;
extern U8 HmiBuzzIsOn;
extern U8 HmiNormalProcessIsRunning;

void HmiBuzz(void);
void HmiBuzzOn(void);
void HmiBuzzOff(void);
void HmiInitSystem(void);
void HmiShowNumber(U16 number);
void HmiShowNumberPoint(U16 number);
void HmiShowNumberOnePoint(U16 number);
void HmiIrqHandler(void);
void HmiSpinIrqHandler(void);
HMI_PUSH_HANDLER *HmiSetHandler(HMI_PUSH_HANDLER *handler);
#define HmiUnsetHandler(handler) ((void)HmiSetHandler((handler)))
void HmiQueryPulseAccumulator(U16 *data);

U8 HmiWaitForDigit(void);
U16 HmiWaitForNumberEx(U16 original,U8 min,U8 max,U16 scale);
#define HmiWaitForNumber(original,scale) (HmiWaitForNumberEx(original,0,99,scale))
void HmiNormalQuitIrqHandler(void);


/* END Hmi */

#endif

